<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>订单管理</title>
	<jsp:include page="/abstract/base-head.jsp"></jsp:include>
</head>
<body>
	
	<div id="header">
			<img class="logo_img" alt="" src="../../static/img/logo.gif" >
			<span class="wel_word">订单管理系统</span>
			<jsp:include page="/abstract/base-manager.jsp"></jsp:include>
	</div>
	
	<div id="main">
		<c:if test="${empty allOrders}">
			<h1>当前没有用户订单</h1>
		</c:if>
		<c:if test="${!empty allOrders}">
			<table>
				<tr>
					<td>订单号</td>
					<td>日期</td>
					<td>金额</td>
					<td>详情</td>
					<td>发货</td>
				</tr>
				<c:forEach items="${allOrders}" var="order">
					<tr>
						<td>${order.orderId}</td>
						<td>${order.createTime}</td>
						<td>${order.totalMoney}</td>
						<td><a href="#">详情</a></td>
						<c:choose>
							<c:when test="${order.status == 0}">
								<td><a href="admin/order?method=updateOrderStatus&order_id=${order.orderId}">发货</a></td>
							</c:when>
							<c:when test="${order.status == 1}">
								<td>已发货</td>
							</c:when>
							<c:when test="${order.status == 2}">
								<td>订单完成</td>
							</c:when>
						</c:choose>

					</tr>
				</c:forEach>
			</table>
		</c:if>
	</div>
	
	<div id="bottom">
		<span>
			尚硅谷书城.Copyright &copy;2015
		</span>
	</div>
</body>
</html>